package com.telenav;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		testFFT();

	}

	public static void testFFT() throws Exception {
		Complex[] TD = new Complex[512];
		Complex[] FD = new Complex[512];
		FileInputStream fis = new FileInputStream("D:\\workspace42\\ImageProcess\\clog.txt");
		InputStreamReader isr = new InputStreamReader(fis);
		BufferedReader br = new BufferedReader(isr);
		br.readLine();
		for (int t = 0; t < 512; t++) {
			String line = br.readLine();
			TD[t] = new Complex(Double.valueOf(line.split(",")[0]), Double.valueOf(line.split(",")[1]));
			FD[t] = new Complex(0, 0);
		}
		br.close();
		ImgProcess.FFT(TD, FD, 9, 0,0);
	}
}
